package petrus;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Emoticon {

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private String txt;     //Holds the text which the image replaces
	@Persistent
    private String url; //Path to the image placement

    public Emoticon(String txt, String url) {
            this.txt = txt;
            this.url = url;
    }

    /**
     * @return the txt
     */
    public String getTxt() {
            return txt;
    }

    /**
     * @return the url
     */
    public String getUrl() {
            return url;
    }
    
    /**
     * @return the length of the txt entry
     */
    public int getTxtLen() {
            return txt.length();
    }	
	
}
